package com.xunlai.infra.permission.storage.repository;

import com.xunlai.infra.permission.storage.entity.RoleRelation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.List;

/**
 * @author liang
 * @date 12/9/22 11:07 AM
 */
@Transactional(readOnly = true)
public interface RoleRelationRepository extends BaseAllRoundRepository<RoleRelation,Long> {

    List<RoleRelation> findAllByTargetIdAndTargetTypeAndTenantId(Long targetId,Short targetType,Long tenantId);

    List<RoleRelation> findAllByTargetIdInAndTargetTypeAndTenantId(Collection<Long> targetId, Short targetType, Long tenantId);
}
